import request from '@/utils/request'

// 查询会议室管理列表
export function listRooms(query) {
  return request({
    url: '/kjy/rooms/list',
    method: 'get',
    params: query
  })
}

// 查询会议室管理详细
export function getRooms(id) {
  return request({
    url: '/kjy/rooms/' + id,
    method: 'get'
  })
}

// 新增会议室管理
export function addRooms(data) {
  return request({
    url: '/kjy/rooms',
    method: 'post',
    data: data
  })
}

// 修改会议室管理
export function updateRooms(data) {
  return request({
    url: '/kjy/rooms',
    method: 'put',
    data: data
  })
}

// 删除会议室管理
export function delRooms(id) {
  return request({
    url: '/kjy/rooms/' + id,
    method: 'delete'
  })
}

//改变预约状态
export function changeStatus(data) {
  return request({
    url: '/kjy/roomReservation',
    method: 'put',
    data: data
  })
}
